<!-- HTML header for doxygen 1.8.14-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="cache-control" content="max-age=86400"/>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.9.1"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>GBDK 2020 Docs: gbdk-lib/include/stdlib.h File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="doxygen_extra.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">GBDK 2020 Docs
   &#160;<span id="projectnumber">4.4.0</span>
   </div>
   <div id="projectbrief">API Documentation for GBDK 2020</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.1 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search','.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(document).ready(function(){initNavTree('stdlib_8h.html',''); initResizable(); });
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">stdlib.h File Reference</div>  </div>
</div><!--header-->
<div class="contents">
<div class="textblock"><code>#include &lt;<a class="el" href="types_8h_source.html">types.h</a>&gt;</code><br />
</div>
<p><a href="stdlib_8h_source.html">Go to the source code of this file.</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:a259b56e52cd0350410d31610758c7b24"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="stdlib_8h.html#a259b56e52cd0350410d31610758c7b24">exit</a> (int status) <a class="el" href="asm_2types_8h.html#a0971918860055db2e50dacea4da8f3bc">OLDCALL</a></td></tr>
<tr class="separator:a259b56e52cd0350410d31610758c7b24"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af15d7205d8d10c4820f997ce5c526279"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="stdlib_8h.html#af15d7205d8d10c4820f997ce5c526279">abs</a> (int i)</td></tr>
<tr class="separator:af15d7205d8d10c4820f997ce5c526279"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8b7210ba18f750970a2db3c73a841a22"><td class="memItemLeft" align="right" valign="top">long&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="stdlib_8h.html#a8b7210ba18f750970a2db3c73a841a22">labs</a> (long num) <a class="el" href="asm_2types_8h.html#a0971918860055db2e50dacea4da8f3bc">OLDCALL</a></td></tr>
<tr class="separator:a8b7210ba18f750970a2db3c73a841a22"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a30670a60464f77af17dfb353353d6df8"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="stdlib_8h.html#a30670a60464f77af17dfb353353d6df8">atoi</a> (const char *s)</td></tr>
<tr class="separator:a30670a60464f77af17dfb353353d6df8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a825c37450147a643edbcb1a435518307"><td class="memItemLeft" align="right" valign="top">long&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="stdlib_8h.html#a825c37450147a643edbcb1a435518307">atol</a> (const char *s)</td></tr>
<tr class="separator:a825c37450147a643edbcb1a435518307"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aac2ea595a9ea8f5ebd883a0bc05eba5c"><td class="memItemLeft" align="right" valign="top">char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="stdlib_8h.html#aac2ea595a9ea8f5ebd883a0bc05eba5c">itoa</a> (int n, char *s, unsigned char radix) <a class="el" href="asm_2types_8h.html#a0971918860055db2e50dacea4da8f3bc">OLDCALL</a></td></tr>
<tr class="separator:aac2ea595a9ea8f5ebd883a0bc05eba5c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a38c070016cb06132360cfa5bacc2ed19"><td class="memItemLeft" align="right" valign="top">char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="stdlib_8h.html#a38c070016cb06132360cfa5bacc2ed19">uitoa</a> (unsigned int n, char *s, unsigned char radix) <a class="el" href="asm_2types_8h.html#a0971918860055db2e50dacea4da8f3bc">OLDCALL</a></td></tr>
<tr class="separator:a38c070016cb06132360cfa5bacc2ed19"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6374e62474a5a76c7ace9a59fb1cc829"><td class="memItemLeft" align="right" valign="top">char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="stdlib_8h.html#a6374e62474a5a76c7ace9a59fb1cc829">ltoa</a> (long n, char *s, unsigned char radix) <a class="el" href="asm_2types_8h.html#a0971918860055db2e50dacea4da8f3bc">OLDCALL</a></td></tr>
<tr class="separator:a6374e62474a5a76c7ace9a59fb1cc829"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac22b79fe0c1279eabc3daf57328008d2"><td class="memItemLeft" align="right" valign="top">char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="stdlib_8h.html#ac22b79fe0c1279eabc3daf57328008d2">ultoa</a> (unsigned long n, char *s, unsigned char radix) <a class="el" href="asm_2types_8h.html#a0971918860055db2e50dacea4da8f3bc">OLDCALL</a></td></tr>
<tr class="separator:ac22b79fe0c1279eabc3daf57328008d2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a62b7798461bd461da64c5f9d35feddf7"><td class="memItemLeft" align="right" valign="top">void *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="stdlib_8h.html#a62b7798461bd461da64c5f9d35feddf7">calloc</a> (<a class="el" href="asm_2mos6502_2types_8h.html#a7c94ea6f8948649f8d181ae55911eeaf">size_t</a> nmemb, <a class="el" href="asm_2mos6502_2types_8h.html#a7c94ea6f8948649f8d181ae55911eeaf">size_t</a> size)</td></tr>
<tr class="separator:a62b7798461bd461da64c5f9d35feddf7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7ac38fce3243a7dcf448301ee9ffd392"><td class="memItemLeft" align="right" valign="top">void *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="stdlib_8h.html#a7ac38fce3243a7dcf448301ee9ffd392">malloc</a> (<a class="el" href="asm_2mos6502_2types_8h.html#a7c94ea6f8948649f8d181ae55911eeaf">size_t</a> size)</td></tr>
<tr class="separator:a7ac38fce3243a7dcf448301ee9ffd392"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1a6b5e8d2f1c37e5b43e4345586075be"><td class="memItemLeft" align="right" valign="top">void *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="stdlib_8h.html#a1a6b5e8d2f1c37e5b43e4345586075be">realloc</a> (void *ptr, <a class="el" href="asm_2mos6502_2types_8h.html#a7c94ea6f8948649f8d181ae55911eeaf">size_t</a> size)</td></tr>
<tr class="separator:a1a6b5e8d2f1c37e5b43e4345586075be"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:afbedc913aa4651b3c3b4b3aecd9b4711"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="stdlib_8h.html#afbedc913aa4651b3c3b4b3aecd9b4711">free</a> (void *ptr)</td></tr>
<tr class="separator:afbedc913aa4651b3c3b4b3aecd9b4711"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7e208aa7d4ee2f78ae85fff6c36d3a07"><td class="memItemLeft" align="right" valign="top">void *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="stdlib_8h.html#a7e208aa7d4ee2f78ae85fff6c36d3a07">bsearch</a> (const void *key, const void *base, <a class="el" href="asm_2mos6502_2types_8h.html#a7c94ea6f8948649f8d181ae55911eeaf">size_t</a> nmemb, <a class="el" href="asm_2mos6502_2types_8h.html#a7c94ea6f8948649f8d181ae55911eeaf">size_t</a> size, int(*compar)(const void *, const void *) REENTRANT)</td></tr>
<tr class="separator:a7e208aa7d4ee2f78ae85fff6c36d3a07"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aaede534f3eed2c667229d50df10fca0e"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="stdlib_8h.html#aaede534f3eed2c667229d50df10fca0e">qsort</a> (void *base, <a class="el" href="asm_2mos6502_2types_8h.html#a7c94ea6f8948649f8d181ae55911eeaf">size_t</a> nmemb, <a class="el" href="asm_2mos6502_2types_8h.html#a7c94ea6f8948649f8d181ae55911eeaf">size_t</a> size, int(*compar)(const void *, const void *) REENTRANT)</td></tr>
<tr class="separator:aaede534f3eed2c667229d50df10fca0e"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<h2 class="groupheader">Function Documentation</h2>
<a id="a259b56e52cd0350410d31610758c7b24"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a259b56e52cd0350410d31610758c7b24">&#9670;&nbsp;</a></span>exit()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void exit </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>status</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>file stdlib.h 'Standard library' functions, for whatever that means. Causes normal program termination and the value of status is returned to the parent. All open streams are flushed and closed. </p>

</div>
</div>
<a id="af15d7205d8d10c4820f997ce5c526279"></a>
<h2 class="memtitle"><span class="permalink"><a href="#af15d7205d8d10c4820f997ce5c526279">&#9670;&nbsp;</a></span>abs()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int abs </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>i</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Returns the absolute value of int <b>i</b> </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">i</td><td>Int to obtain absolute value of</td></tr>
  </table>
  </dd>
</dl>
<p>If i is negative, returns -i; else returns i. </p>

</div>
</div>
<a id="a8b7210ba18f750970a2db3c73a841a22"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a8b7210ba18f750970a2db3c73a841a22">&#9670;&nbsp;</a></span>labs()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">long labs </td>
          <td>(</td>
          <td class="paramtype">long&#160;</td>
          <td class="paramname"><em>num</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Returns the absolute value of long int <b>num</b></p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">num</td><td>Long integer to obtain absolute value of </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="a30670a60464f77af17dfb353353d6df8"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a30670a60464f77af17dfb353353d6df8">&#9670;&nbsp;</a></span>atoi()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int atoi </td>
          <td>(</td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>s</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Converts an ASCII string to an int</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">s</td><td>String to convert to an int</td></tr>
  </table>
  </dd>
</dl>
<p>The string may be of the format </p><div class="fragment"><div class="line">[\s]*[+-][<a class="code" href="gb_8h.html#a0a3d95ad0ab8ad213016101d2e9c3d3e">\d</a>]+[\D]*</div>
<div class="ttc" id="agb_8h_html_a0a3d95ad0ab8ad213016101d2e9c3d3e"><div class="ttname"><a href="gb_8h.html#a0a3d95ad0ab8ad213016101d2e9c3d3e">d</a></div><div class="ttdeci">uint8_t d</div><div class="ttdef"><b>Definition:</b> gb.h:419</div></div>
</div><!-- fragment --><p> i.e. any number of spaces, an optional + or -, then an arbitrary number of digits.</p>
<p>The result is undefined if the number doesnt fit in an int.</p>
<p>Returns: Int value of string </p>

</div>
</div>
<a id="a825c37450147a643edbcb1a435518307"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a825c37450147a643edbcb1a435518307">&#9670;&nbsp;</a></span>atol()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">long atol </td>
          <td>(</td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>s</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Converts an ASCII string to a long. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">s</td><td>String to convert to an long int </td></tr>
  </table>
  </dd>
</dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="stdlib_8h.html#a30670a60464f77af17dfb353353d6df8">atoi()</a></dd></dl>
<p>Returns: Long int value of string </p>

</div>
</div>
<a id="aac2ea595a9ea8f5ebd883a0bc05eba5c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aac2ea595a9ea8f5ebd883a0bc05eba5c">&#9670;&nbsp;</a></span>itoa()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">char* itoa </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>n</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">char *&#160;</td>
          <td class="paramname"><em>s</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">unsigned char&#160;</td>
          <td class="paramname"><em>radix</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Converts an int into a base 10 ASCII string. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">n</td><td>Int to convert to a string </td></tr>
    <tr><td class="paramname">s</td><td>String to store the converted number </td></tr>
    <tr><td class="paramname">radix</td><td>Numerical base for converted number, ex: 10 is decimal base (parameter is required but not utilized on Game Boy and Analogue Pocket)</td></tr>
  </table>
  </dd>
</dl>
<p>Can be used with <a class="el" href="gb_8h.html#a811c386cac0df2d260aacb5a43608be5">set_bkg_based_tiles()</a> for printing if the digit character tiles are not ascii-mapped.</p>
<p>Returns: Pointer to converted string </p>

</div>
</div>
<a id="a38c070016cb06132360cfa5bacc2ed19"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a38c070016cb06132360cfa5bacc2ed19">&#9670;&nbsp;</a></span>uitoa()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">char* uitoa </td>
          <td>(</td>
          <td class="paramtype">unsigned int&#160;</td>
          <td class="paramname"><em>n</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">char *&#160;</td>
          <td class="paramname"><em>s</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">unsigned char&#160;</td>
          <td class="paramname"><em>radix</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Converts an unsigned int into a base 10 ASCII string. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">n</td><td>Unsigned Int to convert to a string </td></tr>
    <tr><td class="paramname">s</td><td>String to store the converted number </td></tr>
    <tr><td class="paramname">radix</td><td>Numerical base for converted number, ex: 10 is decimal base (parameter is required but not utilized on Game Boy and Analogue Pocket)</td></tr>
  </table>
  </dd>
</dl>
<p>Can be used with <a class="el" href="gb_8h.html#a811c386cac0df2d260aacb5a43608be5">set_bkg_based_tiles()</a> for printing if the digit character tiles are not ascii-mapped.</p>
<p>Returns: Pointer to converted string </p>

</div>
</div>
<a id="a6374e62474a5a76c7ace9a59fb1cc829"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a6374e62474a5a76c7ace9a59fb1cc829">&#9670;&nbsp;</a></span>ltoa()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">char* ltoa </td>
          <td>(</td>
          <td class="paramtype">long&#160;</td>
          <td class="paramname"><em>n</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">char *&#160;</td>
          <td class="paramname"><em>s</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">unsigned char&#160;</td>
          <td class="paramname"><em>radix</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Converts a long into a base 10 ASCII string. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">n</td><td>Long int to convert to a string </td></tr>
    <tr><td class="paramname">s</td><td>String to store the converted number </td></tr>
    <tr><td class="paramname">radix</td><td>Numerical base for converted number, ex: 10 is decimal base (parameter is required but not utilized on Game Boy and Analogue Pocket)</td></tr>
  </table>
  </dd>
</dl>
<p>Can be used with <a class="el" href="gb_8h.html#a811c386cac0df2d260aacb5a43608be5">set_bkg_based_tiles()</a> for printing if the digit character tiles are not ascii-mapped.</p>
<p>Returns: Pointer to converted string </p>

</div>
</div>
<a id="ac22b79fe0c1279eabc3daf57328008d2"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ac22b79fe0c1279eabc3daf57328008d2">&#9670;&nbsp;</a></span>ultoa()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">char* ultoa </td>
          <td>(</td>
          <td class="paramtype">unsigned long&#160;</td>
          <td class="paramname"><em>n</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">char *&#160;</td>
          <td class="paramname"><em>s</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">unsigned char&#160;</td>
          <td class="paramname"><em>radix</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Converts an unsigned long into a base 10 ASCII string. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">n</td><td>Unsigned Long Int to convert to a string </td></tr>
    <tr><td class="paramname">s</td><td>String to store the converted number </td></tr>
    <tr><td class="paramname">radix</td><td>Numerical base for converted number, ex: 10 is decimal base (parameter is required but not utilized on Game Boy and Analogue Pocket)</td></tr>
  </table>
  </dd>
</dl>
<p>Can be used with <a class="el" href="gb_8h.html#a811c386cac0df2d260aacb5a43608be5">set_bkg_based_tiles()</a> for printing if the digit character tiles are not ascii-mapped.</p>
<p>Returns: Pointer to converted string </p>

</div>
</div>
<a id="a62b7798461bd461da64c5f9d35feddf7"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a62b7798461bd461da64c5f9d35feddf7">&#9670;&nbsp;</a></span>calloc()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void* calloc </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="asm_2mos6502_2types_8h.html#a7c94ea6f8948649f8d181ae55911eeaf">size_t</a>&#160;</td>
          <td class="paramname"><em>nmemb</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="asm_2mos6502_2types_8h.html#a7c94ea6f8948649f8d181ae55911eeaf">size_t</a>&#160;</td>
          <td class="paramname"><em>size</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Memory allocation functions </p>

</div>
</div>
<a id="a7ac38fce3243a7dcf448301ee9ffd392"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a7ac38fce3243a7dcf448301ee9ffd392">&#9670;&nbsp;</a></span>malloc()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void* malloc </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="asm_2mos6502_2types_8h.html#a7c94ea6f8948649f8d181ae55911eeaf">size_t</a>&#160;</td>
          <td class="paramname"><em>size</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a id="a1a6b5e8d2f1c37e5b43e4345586075be"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a1a6b5e8d2f1c37e5b43e4345586075be">&#9670;&nbsp;</a></span>realloc()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void* realloc </td>
          <td>(</td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>ptr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="asm_2mos6502_2types_8h.html#a7c94ea6f8948649f8d181ae55911eeaf">size_t</a>&#160;</td>
          <td class="paramname"><em>size</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a id="afbedc913aa4651b3c3b4b3aecd9b4711"></a>
<h2 class="memtitle"><span class="permalink"><a href="#afbedc913aa4651b3c3b4b3aecd9b4711">&#9670;&nbsp;</a></span>free()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void free </td>
          <td>(</td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>ptr</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a id="a7e208aa7d4ee2f78ae85fff6c36d3a07"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a7e208aa7d4ee2f78ae85fff6c36d3a07">&#9670;&nbsp;</a></span>bsearch()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void* bsearch </td>
          <td>(</td>
          <td class="paramtype">const void *&#160;</td>
          <td class="paramname"><em>key</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const void *&#160;</td>
          <td class="paramname"><em>base</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="asm_2mos6502_2types_8h.html#a7c94ea6f8948649f8d181ae55911eeaf">size_t</a>&#160;</td>
          <td class="paramname"><em>nmemb</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="asm_2mos6502_2types_8h.html#a7c94ea6f8948649f8d181ae55911eeaf">size_t</a>&#160;</td>
          <td class="paramname"><em>size</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int(*)(const void *, const void *) REENTRANT&#160;</td>
          <td class="paramname"><em>compar</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>search a sorted array of <b>nmemb</b> items </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">key</td><td>Pointer to object that is the key for the search </td></tr>
    <tr><td class="paramname">base</td><td>Pointer to first object in the array to search </td></tr>
    <tr><td class="paramname">nmemb</td><td>Number of elements in the array </td></tr>
    <tr><td class="paramname">size</td><td>Size in bytes of each element in the array </td></tr>
    <tr><td class="paramname">compar</td><td>Function used to compare two elements of the array</td></tr>
  </table>
  </dd>
</dl>
<p>Returns: Pointer to array entry that matches the search key. If key is not found, NULL is returned. </p>

</div>
</div>
<a id="aaede534f3eed2c667229d50df10fca0e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aaede534f3eed2c667229d50df10fca0e">&#9670;&nbsp;</a></span>qsort()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void qsort </td>
          <td>(</td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>base</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="asm_2mos6502_2types_8h.html#a7c94ea6f8948649f8d181ae55911eeaf">size_t</a>&#160;</td>
          <td class="paramname"><em>nmemb</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="asm_2mos6502_2types_8h.html#a7c94ea6f8948649f8d181ae55911eeaf">size_t</a>&#160;</td>
          <td class="paramname"><em>size</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int(*)(const void *, const void *) REENTRANT&#160;</td>
          <td class="paramname"><em>compar</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Sort an array of <b>nmemb</b> items </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">base</td><td>Pointer to first object in the array to sort </td></tr>
    <tr><td class="paramname">nmemb</td><td>Number of elements in the array </td></tr>
    <tr><td class="paramname">size</td><td>Size in bytes of each element in the array </td></tr>
    <tr><td class="paramname">compar</td><td>Function used to compare and sort two elements of the array </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- HTML footer for doxygen 1.8.14-->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
</div>
</body>
</html>
